#pragma once


#include "windows.h"


class CXorCoding
{
public:

	DWORD m_dwEncodeKey;
	DWORD m_dwDecodeKey;

	void Reset();

	void RandomSeed();

	WORD SeedRandMap(WORD wSeed);

	DWORD Encode(DWORD* pdwXor, WORD wEncrypCount, WORD* pwSeed);

	DWORD Decode(DWORD* pdwXor,
		WORD wEncrypCount,
		WORD* pwSeed,
		WORD wSnapCount,
		unsigned char* pcbDataBuffer,
		WORD wDataSize);

	void SetKey(DWORD dwEncodeKey, DWORD dwDecodeKey);



	CXorCoding();
	~CXorCoding();
};

